#ifndef TRYNETHREAD_H_
#define TRYNETHREAD_H_

// By: Jesse Guarascia de Urena
// Tryne thread class
// Allows for running of functions, using threads

#include <SDL.h>
#include <SDL_thread.h>

class TryneThread
{
private:
	SDL_Thread *thread; // Thread component
	bool running; // W-o-N the thread is running

public:
	TryneThread(void);
	~TryneThread(void);

	// Run a given function
	void Run(int (*func)(void *data));

	void Run(int (*func)(void *data), void *data);

	// Stop the thread
	void Stop(); 

	// Get the running flag
	inline bool isRunning() { return running; }
};

#endif // TRYNETHREAD_H_

